{layout name="layout/default" /}
<div class="panel panel-default panel-intro">
  <div class="panel-heading">
    <div class="panel-lead"><em>{$nav_title.title}</em>{$nav_title.remark}</div>
  </div>
  <div class="panel-body">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade active in">
        <div class="widget-body no-padding">
          <div class="bootstrap-table">
            <div class="commonsearch-table hidden">
<form class="form-inline form-commonsearch nice-validator n-default" method="post" action="" role="form">
<div class="form-group" style="padding:0 10px 0 0px;position: relative;"><label for="createtime" class="control-label" style="padding:0 10px">时间选择</label><input class="form-control operate" name="field-createtime" data-name="createtime" value="BETWEEN" readonly="" type="hidden"><input class="form-control datetimepicker" name="start_time" value="" placeholder="开始时间" id="createtime" data-date-format="YYYY-MM-DD HH:mm:ss" type="datetime">&nbsp;-&nbsp;<input class="form-control datetimepicker" name="end_time" value="" placeholder="结束时间" id="createtime" data-date-format="YYYY-MM-DD HH:mm:ss" type="datetime"></div>
                
                <div class="form-group" style="margin:5px">
                  <div class="col-sm-12 text-center">
                    <button type="submit" class="btn btn-success ajax-posturl" target-form="form-commonsearch">提交</button>
                    <button type="reset" class="btn btn-default">重置</button>
                  </div>
                </div>
              </form>
            </div>
            <div class="fixed-table-toolbar">
              <div class="columns-right pull-right" style="margin-top:10px;">
                <a href="javascript:;" class="btn  btn-default hidedsearch" title="普通搜索"><i class="glyphicon glyphicon-search"></i> </a>
              </div>
              <div class="pull-right search">
                <select name="status" class="form-control" type="get-select">
                  <option value="{:admin_url('admin/action/logs')}">全部状态</option>
                  <option value="{:admin_url('admin/action/logs',array('status'=>1,'uid'=>$uid,'type'=>$type,'order'=>$order))}" {eq name="status" value="1"}selected{/eq}>
                  操作成功
                  </option>
                  <option value="{:admin_url('admin/action/logs',array('status'=>2,'uid'=>$uid,'type'=>$type,'order'=>$order))}" {eq name="status" value="2"}selected{/eq}>
                  操作失败
                  </option>
                </select>
              </div>
              <div class="bs-bars pull-left">
                <div id="toolbar" class="toolbar"><a href="{:admin_url('admin/action/logs')}" class="btn btn-primary ajax-url"><i class="fa fa-refresh"></i> </a> <a  url="{:admin_url('admin/action/dellog')}" target-form="ids" class="confirm btn btn-danger btn-del btn-disabled ajax-post disabled"><i class="fa fa-trash"></i> 删除</a> <a url="{:admin_url('admin/action/clear')}" class="confirm btn btn-warning  ajax-get"><i class="fa fa-trash"></i> 清空</a> <span id="selectedChks" style="display:none">已选择<strong></strong>记录</span> </div>
              </div>
            </div>
          </div>
          <div class="fixed-table-container" style="padding-bottom: 0px;" id="contents">
            <div class="fixed-table-body">
              <form class="ids">
                <table id="table" class="table table-striped table-bordered table-hover" style="margin-top: 0px;" width="100%">
                  <thead>
                    <tr style="height:45px;">
                      <th align="center" class="bs-checkbox"><input name="chkall" type="checkbox" id="chkall"></th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="id desc"}<a href="{:admin_url('admin/action/logs',array('status'=>$status,'uid'=>$uid,'type'=>'id','order'=>'asc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/action/logs',array('status'=>$status,'uid'=>$uid,'type'=>'id','order'=>'desc'))}" class="btn-link sort ajax-url">编号 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">执行者</th>
                      <th style="text-align:left;vertical-align: middle;">执行地址</th>
                      <th style="text-align:center;vertical-align: middle;">执行状态</th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="create_time desc"}<a href="{:admin_url('admin/action/logs',array('status'=>$status,'uid'=>$uid,'type'=>'create_time','order'=>'asc'))}" class="btn-link sort ajax-url">操作时间 <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/action/logs',array('status'=>$status,'uid'=>$uid,'type'=>'create_time','order'=>'desc'))}" class="btn-link sort ajax-url">操作时间 <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">{eq name="orders" value="action_ip desc"}<a href="{:admin_url('admin/action/logs',array('status'=>$status,'uid'=>$uid,'type'=>'action_ip','order'=>'asc'))}" class="btn-link sort ajax-url">执行IP <i class="fa fa-angle-up"></i></a>{else/}<a href="{:admin_url('admin/action/logs',array('status'=>$status,'uid'=>$uid,'type'=>'action_ip','order'=>'desc'))}" class="btn-link sort ajax-url">执行IP <i class="fa fa-angle-down"></i></a>{/eq}</th>
                      <th style="text-align:center;vertical-align: middle;">操作</th>
                    </tr>
                  </thead>
                  <tbody>
                  {notempty name="list"}
                  {volist name="list" id="vo"}
                  <tr class="">
                    <td class="bs-checkbox" style="text-align:center;vertical-align: middle;"><input name="id[]" type="checkbox" value="{$vo['id']}" id="checkbox"></td>
                    <td style="text-align:center;vertical-align: middle;">{$vo['id']}</td>
                    <td style="text-align:center;vertical-align: middle;"><a class="ajax-url btn-link" href="{:admin_url('admin/action/logs',array('uid'=>$vo['user_id']))}">{$vo['nickname']}</a></td>
                    <td >{$vo['title']}{$vo['remark']}</td>
                    <td style="text-align:center;vertical-align: middle;"> {eq name="vo.status" value="1"}<a href="{:admin_url('admin/action/logs',array('status'=>1,'uid'=>$vo['user_id'],'type'=>$type,'order'=>$order))}" class="btn btn-info btn-xs btn-success ajax-url" >成功</a>{else /}<a href="{:admin_url('admin/action/logs',array('status'=>2,'uid'=>$vo['user_id'],'type'=>$type,'order'=>$order))}" class="btn btn-info btn-xs btn-danger ajax-url">失败</a>{/eq} </td>
                    <td style="text-align:center;vertical-align: middle;">{$vo.create_time|date='Y-m-d H:i:s',###}</td>
                    <td style="text-align:center;vertical-align: middle;"><i class="fa fa-map-marker"></i> {$vo.action_ip|long2ip}</td>
                    <td style="text-align:center;vertical-align: middle;"><a href="javascript:;" data-url="{:admin_url('admin/action/detail',array('id'=>$vo['id']))}"  data-name="日志详细" class="btn btn-success btn-edit btn-detail btn-xs"><i class="fa fa-paste"></i> 详细</a> <a url="{:admin_url('admin/action/dellog',array('id'=>$vo['id']))}" class="confirm btn btn-danger btn-xs ajax-get"><i class="fa fa-trash-o"></i> 删除</a></td>
                  </tr>
                  {/volist}    
                  {else/}
                  <tr>
                    <td style="text-align:center;vertical-align: middle;" colspan="8" >抱歉，没有找到相关内容！</td>
                  </tr>
                  {/notempty}
                  </tbody>
                  
                </table>
              </form>
            </div>
            {gt name="list->lastPage()" value="1"}
            <div class="fixed-table-pagination" style="overflow:hidden">
              <div class="pull-left pagination-detail"><span class="pagination-info">共{$list->total()}条 {$list->currentPage()}/{$list->lastPage()} </span><span class="page-list">每页显示 {$list->listRows()} 条</span></div>
              <div class="pull-right pagination">
                <ul class="pagination">
                  {$page}
                </ul>
              </div>
            </div>
            {/gt}
          </div>
        </div>
        <div class="clearfix"></div>
      </div>
    </div>
  </div>
</div>
</div>
